//
//  SKUManager.h
//  B2C
//
//  Created by xiaowu on 2017/8/10.
//  Copyright © 2017年 lixiaolong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GoodDetailModel.h"

@interface SKUManager : NSObject

// 获取已选中的属性值
+ (NSMutableArray <GoodAttributeValueModel *> *)getSelectAttrWithAllAttributeArr:(NSMutableArray <GoodAttributeModel *> *)attrArray;

// 根据已经选择得属性值，得到余下还能选择的属性值
+ (NSMutableArray <NSString *> *)getFilterAttrs:(NSMutableArray <GoodAttributeValueModel *> *)select_Attrids
                                withPriceSkuArr:(NSMutableArray <GoodsAttributePriceModel *> *)priceSkuArr
                                andAttributeArr:(NSMutableArray <GoodAttributeModel *> *)attributeArr;

//获取所有包含指定节点的路线
+ (NSMutableArray <GoodsAttributePriceModel *> *)getFilterProduct:(NSMutableArray <GoodAttributeValueModel *> *)ids withPriceSkuArr:(NSMutableArray <GoodsAttributePriceModel *> *)priceSkuArr;


/**
 设置对象是否可选状态
 
 @param attrArray 原始属性数组
 @param valueArr 可选属性数组
 @return 返回属性是否可选的数组
 */
+ (NSMutableArray <GoodAttributeModel *> *)setSelectState:(NSMutableArray <GoodAttributeModel *> *)attrArray value:(NSMutableArray <NSString *> *)valueArr;

/**
 查看对象是否都选择
 
 @param attrArray 原始属性数组
 @return 返回是否属性都已选择
 */
+ (BOOL)allAttributeSelect:(NSMutableArray <GoodAttributeModel *> *)attrArray;

// 获取可选所有属性
+ (NSMutableArray <NSString *> *)getCanSelectAttribute:(NSMutableArray <GoodAttributeValueModel *> *)valueArr
                                       withPriceSkuArr:(NSMutableArray <GoodsAttributePriceModel *> *)priceSkuArr
                                               attrArr:(NSMutableArray <GoodAttributeModel *> *)attrArray;

// 更新属性数组为选中状态
+ (NSMutableArray *)getSelectOriginDataArr:(NSArray *)attrArray withPriceSkuArr:(NSArray *)priceSkuArr withGaid:(NSString *)gaid;

// 过滤一遍，把库存为0的从数组中去掉
+ (NSMutableArray *)getSKUCountPriceItem:(NSArray <GoodsAttributePriceModel *> *)priceSkuArr;

@end
